#ifndef _GLOBALS_H
#define _GLOBALS_H

/* Exit conditions for main() */
#define RETURN_OK                   0
#define RETURN_MEMORY_MAP_FAILED    1
#define RETURN_STATE_ERROR          2
#define RETURN_COMPONENT_INIT_ERROR 3

#define LOOP_STOP    0
#define LOOP_FOREVER 1

/* Base address for the physical memory on the TS7300 */
#define ADDR_MEM_PHYSICAL           0x72A00000
#define ADDR_MEM_GPIO           	0x80840000
#define ADDR_MEM_MODELBASE          0x22000000

typedef unsigned int memaddr_t;

/* States - NULL is used for housekeeping functionality */
#define STATE_NULL                  0x00
#define STATE_KEYPAD_CHECK          0x01
#define STATE_ARM_MOVEMENT          0x02
#define STATE_LCD_OUT               0x03
#define STATE_HANDLE_KEYPAD_IO      0x04
#define STATE_EXIT                  0x05
#define STATE_HOLDING_STATE         0x06

#endif

